/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package trivia;

import java.util.Vector;


/**
 *
 * @author mourawi
 */
public class Subject {

    private String name;

    private Vector problems;

    public Subject(String name) {
        this.name = name;
        this.problems = new Vector();
    }

    public String getName() {
        return name;
    }

    public void addProblem(Problem problem) {
        problems.addElement(problem);
    }

    public int getProblemsNumber() {
        return problems.size();
    }

    public Problem getProblem(int index) {
        return (Problem)problems.elementAt(index);
    }
}
